<?php

use app\assets\ApiAsset;
use app\assets\LayerAsset;
use app\assets\TableAsset;
use app\models\KeyMap;
use app\models\UserConfig;
use yii\helpers\Html;
use yii\helpers\Url;

/**
 * @var $this yii\web\View
 * @var $user app\models\User
 */

ApiAsset::register($this);
LayerAsset::register($this);
TableAsset::register($this);

$this->title = '入库订单详情';
$this->params['breadcrumbs'][] = '入库订单详情';
$this->params['breadcrumbs'][] = $this->title;
?>
<table class="table table-striped table-bordered table-hover">
    <tr>
        <th colspan="2"><h4>基本信息</h4></th>
    </tr>
    <tr>
        <th>编号</th>
        <td><?php echo $order->id;?></td>
    </tr>
    <tr>
        <th>创建时间</th>
        <td><?php echo Yii::$app->formatter->asDatetime($order->rk_time);?></td>
    </tr>
    <tr>
        <th>订单号</th>
        <td><?php echo $order->rkorder;?></td>
    </tr>
    <tr>
        <th>采购项目名称</th>
        <td><?php echo Html::encode($order->rk_name);?></td>
    </tr>
    <tr>
        <th>接口</th>
        <td><?php echo Html::encode($order->api->name);?></td>
    </tr>
    <tr>
        <th>运营商</th>
        <td><?php echo Html::a(Html::encode($order->isp->name), ['/admin/card/isp-view', 'id' => $order->isp_id]);?></td>
    </tr>
    <tr>
        <th>套餐</th>
        <td><?php echo Html::a(Html::encode($order->packageIsp->name), ['/admin/card/package-view', 'id' => $order->package_id]);?></td>
    </tr>
    <tr>
        <th>采购数量</th>
        <td><?php echo Html::encode($order->number);?></td>
    </tr>
    <tr>
        <th>iccid开始-结束</th>
        <td><?php echo Html::encode($order->iccid_start);?>---<?php echo Html::encode($order->iccid_end);?></td>
    </tr>
    <tr>
        <th>iccid列表</th>
        <td><?php echo Html::encode($order->iccid_list);?></td>
    </tr>
    <tr>
        <th>单价(卡)</th>
        <td><?php echo Html::encode($order->price);?></td>
    </tr>
    
    <tr>
        <th>总价</th>
        <td><?php echo Html::encode($order->total_price);?></td>
    </tr>
    <tr>
        <th>导入状态</th>
        <td><?php echo KeyMap::getValue('import_status',$order->import_status);?>
        </td>
    </tr>
    
    <tr>
        <button type="button" class="btn btn-default" onclick="window.history.go(-1);"><i class="ace-icon fa fa-arrow-left bigger-110"></i>返回</button> &nbsp;
        <button tyoe="button" class="btn btn-info" onclick="window.location.reload();"><i class="ace-icon fa fa-refresh bigger-110"></i>刷新</button> 
        
    </tr>
</table>

